xlv.obj.calendarEditor={
	extend:function(){
		this.extend('xlv.obj.calendar');
	},
	implement:function(){
		this.implement('xlv.imp.editor');
	},
	create:function(tag){
		var div=document.createElement((tag||'div'));
		div.setAttribute('xlvobject','xlv.obj.calendarEditor');
		return div;			
	},
	properties:{
	},
	method:{
		initial:function(){
			this.$super('xlv.obj.calendar.initial');
			Element.setStyle(this,{zIndex:xlv.sys.zIndexPopup});
			this.editor_properties.commitDocumentMouseDown=false;
		},
		select_changed:function(to_item,from_item){
			this.$super('xlv.obj.calendar.select_changed',to_item,from_item);
			this._editor_endEdit(true);
		},
		editor_policy:function(source){
			return {install:'attach',offsetLeft:-12,offsetTop:-12,align:'middle'};
		},
		editor_startEdit:function(){
			Element.removeClassName(this.$V.editor,'validate_error');
		},
		editor_valueToEditor:function(value){
			var date=new Date();
			if(value)date.parseDate(value);
			this.setDate(date);
		},
		editor_valueFromEditor:function(){
			return this.$V.current.formatDate();
		},
		editor_endEdit:function(commit){
			/*
			var dm=this.mvc_getModel();
			if(dm && commit)this.mvc_valueToModel(this.editor_valueFromEditor(),dm);
			if(dm && !commit)this.editor_valueToEditor(this.mvc_valueFromModel(dm));
			*/
		}
	}
};
